import Vue from 'vue'
import VueRouter from 'vue-router'
import MyHome from '../views/Myhome.vue'
import MyHome1 from '../views/Myhome1.vue'
import MyHome2 from '../views/Myhome2.vue'

import neirong from '../views/01/neirong.vue'
import neirong1 from '../views/01/neirong1.vue'
import neirong2 from '../views/01/neirong2.vue'

import disan from '../views/01/02/disan.vue'
import disan1 from '../views/01/02/disan1.vue'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: 'myhome'
    },
    {
        path: '/myhome',
        component: MyHome
    },
    {
        path: '/myhome1',
        component: MyHome1,
        children: [
            {
                path: '',
                redirect: 'neirong'
            },
            {
                path: 'neirong',
                component: neirong
            },
            {
                path: 'neirong1',
                component: neirong1,
                children: [
                    {
                        path: 'disan',
                        component: disan
                    },
                    {
                        path: 'disan1',
                        component: disan1
                    }
                ]
            },
            {
                path: 'neirong2',
                component: neirong2
            },
        ]
    },
    {
        path: '/myhome2',
        component: MyHome2
    },
]

const router = new VueRouter({
    routes: routes
})

export default router